\documentclass[letter]{article}

\usepackage{graphicx} \usepackage{tikz}

\title{Data Definition for Shopping List Application}

\author{Crazy Pete}


\begin{document}

\maketitle


%\tableofcontents


\section*{Introduction}

This document describes the data definitions for the shopping list application.  This application
maintains 2 lists of text items, a catalog list of allowable items and a \emph{shopping list}
of these items sorted by date added.

\section{Database Structure}

The primary datum is a list item.   This is a textual description of an item.  Items are stored in
a separate indexed table.  The shopping list table associates an item with the timestamp it was
added to the shopping list.  A shopping list item may be associated with an optional comment.
The comment table is just a large text field (the comment) foreign keyed to the shopping
list table.


\subsection{Database Type Catalog}

This section describes the data types used in the database.

\begin{description}

\item[Long Text] Varchar(512) \\ Used as the comment text field

\item[Row ID] Char(3) \\ Used as the index (id code) for some table rows.

\item[Short Text] Varchar(63) \\ Used as a textual description of each allowable item in the list

\item[Timestamp] Timestamp \\ Used for the time and date an item was added to the list

\end{description}


\subsection{Database Tables}

This section briefly describes the database tables and their relationship to each other.
The following Entity Relationship Diagram may be helpful:

\includegraphics[scale=0.8]{ShoppingTables}


\subsubsection*{Table Descriptions}

\begin{description}

\item[Items] - The list of allowable items

\item[Item List] - A list of items to be purchased immediately, keyed by time added.

\item[Comments] - Contains any comments, each comment is foreign keyed to the Shopping List table.

\item[Shopping List] - A view of the Item List table showing the item
description text

\end{description}


\end{document}

